package gui;

import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Color;
import java.awt.Font;
import java.awt.GridLayout;
import java.util.ArrayList;

import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class OperatingBoard extends JFrame {
	protected static final int ADMIN = 0;
	protected static final int TEACHER = 1;
	protected static final int STUDENT = 2;
	protected String ID;
	protected String userName;
	int identity = TEACHER;
	JPanel welcomePanel;
	JPanel operationListPanel;
	JPanel displayPanel;
	protected Font bigFont = new Font("serif", Font.BOLD, 48);
	protected Font middlFont = new Font("serif", Font.BOLD, 20);
	protected Font smallFont = new Font("serif", Font.BOLD, 10);
	protected  JLabel infoLabel;
	protected boolean isRemote=false;
	public OperatingBoard() {

	}

	public OperatingBoard(String ID, int identity) {
		this.ID = ID;
		this.identity = identity;
		setUserName();
		/* to create the frame */
		this.setLayout(null);
		this.setSize(800, 600);
		this.setTitle("");
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		this.setLocationRelativeTo(null);

		/* to create the welcome panel */
		welcomePanel = new JPanel(null);
		welcomePanel.setBounds(0, 0, 800, 100);
		welcomePanel.setBackground(Color.cyan);
		infoLabel = new JLabel("             Welcome " + " " + userName + " !");
		infoLabel.setFont(bigFont);
		infoLabel.setBounds(0, 0, 800, 100);
		welcomePanel.add(infoLabel);
		this.getContentPane().add(welcomePanel);

		/* to create the panel contains all operations */
		// operationListPanel = new JPanel(new BoxLayout(operationListPanel,
		// BoxLayout.Y_AXIS));
		operationListPanel = new JPanel();
		operationListPanel.setBounds(0, 100, 200, 500);
		operationListPanel.setBackground(Color.PINK);
		this.getContentPane().add(operationListPanel);

		/* to create the specific operating panel to each demand */
		displayPanel = new JPanel();
		displayPanel.setBounds(200, 100, 600, 500);
		displayPanel.setBackground(Color.white);
		displayPanel.setLayout(null);
		this.getContentPane().add(displayPanel);

		this.setVisible(true);
	}

	public void setUserName() {
		// from the remove sever to set name
	}
}
